//
//  StoreMapViewController.h
//  iFoundIt
//
//  Created by Navid Shariat on 4/05/10.
//  Copyright 2010 QUT. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
#import "Store.h"
#import "SystemAnnotation.h"

@interface StoreMapViewController : UIViewController <MKMapViewDelegate, MKReverseGeocoderDelegate, CLLocationManagerDelegate> {
	
	NSMutableArray* foundPlaces;
    IBOutlet MKMapView *mapView;
	CLLocationManager *locationManager;	
	CLLocationCoordinate2D currentLocationCoordinate;
	CLLocationCoordinate2D alternativeLocationCoordinate;
}
@property (nonatomic, retain) NSMutableArray * foundPlaces;
@property (nonatomic, retain) MKMapView *mapView;
@property (nonatomic, retain) CLLocationManager *locationManager;	
@property (nonatomic, readwrite) CLLocationCoordinate2D currentLocationCoordinate;
@property (nonatomic, readwrite) CLLocationCoordinate2D alternativeLocationCoordinate;

#pragma mark actions
- (IBAction) switchToListView;
- (IBAction)reverseGeocodeCurrentLocation;

#pragma mark methods
- (void) nevigateToListView;
- (void)dropPinToCurrentLocation: (CLLocationCoordinate2D) coordinate ;
- (void) createRegion: (double) leftest: (double) rightest: (double) toppest: (double) bottomest;
- (BOOL) areTheSamePlace: (CLLocationCoordinate2D) co1: (CLLocationCoordinate2D) co2;
- (void) initLocationManager;
- (void) dropThePins: (CLLocationCoordinate2D) cd;

@end
